The core network layer protocol for the Internet, as well as numerous other networks, is currently Internet Protocol (IP) version 4. Under implementations of IPv4, each node on a network is associated with at least one IP address consisting of 32 bits. As such, the address space for IPv4 is limited to a finite number of addresses. While this address space was sufficiently large to accommodate the relatively small number of devices attached to the Internet in the past, as the Internet became widely adopted by numerous users, it became apparent that the address space would soon prove insufficient. Further, complex organization would be necessary if each device connected to such a large network were to be given a unique IP address.
In order to help meet these challenges, network address translation (NAT) technology was introduced. Using this method, a number of different devices could share a single IP address. These devices would have different private IP addresses from their own point of view, while sharing a single public IP address. Such sharing may be effected by dividing the logical ports associated with a public IP address between the devices.
To implement NAT, a NAT device is used to maintain a correspondence between public IP-port pairs and private IP-port pairs. When the NAT device receives an outgoing message from one of the devices, it swaps the source address and port in the message with the corresponding public IP address and port. Likewise, when the NAT device receives an incoming message, it swaps the destination address and port in the message with the corresponding private IP address and port. NAT devices are deployed at many different levels of the Internet, whether it be at a lower-tier Internet Service Provider (ISP) to effectively utilize a pool of IP addresses allocated to that ISP or in a home router to provide Internet access to a number of home devices using a single public IP address.